using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
using System.Threading;
using Helpers;

namespace HttpRequester
{
    public class ProxyInfo : WebProxy
    {
        public ProxyInfo(string url, NetworkCredential credentials)
            : base()
        {
            if (!UrlHelper.IsUrlCorrect(url))
                throw new Exception("Incorrect proxy URL");

            ProxyUrl = url;
            ProxyCredentials = credentials;
        }

        public ProxyInfo(string url, string login, string password)
            : this(url, new NetworkCredential(login, password))
        { }

        public NetworkCredential ProxyCredentials { get; set; }
        public string ProxyUrl { get; set; }
    }
}
